using UnityEngine;
using UnityEngine.UI;
using QFramework;
using UnityEngine.SceneManagement;

namespace QFramework.Example
{
    public class UIGameStartPanelData : UIPanelData
    {
       
    }
    public partial class UIGameStartPanel : UIPanel,IController
	{
		protected override void OnInit(IUIData uiData = null)
		{
			mData = uiData as UIGameStartPanelData ?? new UIGameStartPanelData();
			// please add init code here

			CoinShopPanel.Hide();
			OnClickStartPanel();
			
		}
		
		protected override void OnOpen(IUIData uiData = null)
		{
		}
		
		protected override void OnShow()
		{
		}
		
		protected override void OnHide()
		{
		}
		
		protected override void OnClose()
		{
		}

		/// <summary>
		/// ��������ʾ
		/// </summary>
		private void OnClickStartPanel()
        {
			startGameBtn.onClick.AddListener(() =>
			{
				this.CloseSelf();
				SceneManager.LoadScene("Game");
			});

			CoinShopBtn.onClick.AddListener(() =>
			{
				CoinShopPanel.Show();
			});

		}

		

		 public IArchitecture GetArchitecture()
        {
            return Global.Interface;
        }
	}
}
